/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pe.siass.dao;

import com.pe.siass.beans.HechosBean;
import java.util.List;
import org.apache.ibatis.session.SqlSession;

/**
 *
 * @author Hrengifo
 */
public class HechosDao {

    public HechosBean insertHechos(HechosBean hechosBean, SqlSession sqlSession) throws Exception{
         sqlSession.insert("insertHechos", hechosBean);
         return hechosBean;
    }

    public int updateHechos(HechosBean hechosBean, SqlSession sqlSession) throws Exception{
         int aux = sqlSession.update("updateHechos", hechosBean);
         return aux;
    }

    public List<HechosBean> selectHechos(HechosBean hechosBean, SqlSession sqlSession) throws Exception{
         List<HechosBean> lsthechosBean = sqlSession.selectList("selectHechos", hechosBean);
        return lsthechosBean;
    }

}
